package d0327;


import java.util.HashSet;
import java.util.Iterator;
import java.util.Random;

public class Test2 {
    public static void main(String[] args) {
        int arr[] = new int[10];
        for (int i = 0; i < arr.length; i++) {
            int index = (int)(Math.random() * 10 + 1);
            arr[i] = index;
            for (int j = 0; j < i; j++) {
                if (arr[j] == arr[i]) {
                    i--;
                    break;
                }
            }
        }
        for (int i = 0; i < arr.length; i++) {
            System.out.print(arr[i] + " ");
        }
    }
}